package com.wicket.okrapp.web.contorller;
import com.wicket.okrapp.biz.service.dto.req.*;
import com.wicket.okrapp.biz.service.dto.res.*;
import com.github.pagehelper.Page;
import com.wicket.okrapp.biz.service.ContTagRcordService;
import com.wicket.okrapp.common.util.CommonFunctionHelper;
import com.wicket.okrapp.common.ro.OkrResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@RestController
@RequestMapping("/app/contTagRcord/")
public class ContTagRcordController {
    @Autowired
    ContTagRcordService  contTagRcordService;
/**
   * D3-13查业务应用内容标签记录列表
   */
    @PostMapping("queryContTagRcordList")
    public OkrResult<QueryContTagRcordListRespDto> queryContTagRcordList(@RequestBody @Validated QueryContTagRcordListReqDto reqDTO){
    Page<?> page = CommonFunctionHelper.startPage(reqDTO.getPageNum(),reqDTO.getPageSize());

        QueryContTagRcordListRespDto retData = contTagRcordService.queryContTagRcordList(reqDTO);

        retData.setPageNum(page.getPageNum());
        retData.setPageSize(page.getPageSize());
        retData.setTotalNum(page.getTotal());
        return OkrResult.success(retData);
    
    }
/**
   * D3执行指标模板责任主体标签记录处理(公共)
   */
    @PostMapping("implementObjtiveSubjectBodyTagRcordDisposeCom")
    public OkrResult<ImplementObjtiveSubjectBodyTagRcordDisposeComRespDto> implementObjtiveSubjectBodyTagRcordDisposeCom(@RequestBody @Validated ImplementObjtiveSubjectBodyTagRcordDisposeComReqDto reqDTO){
    return OkrResult.success(contTagRcordService.implementObjtiveSubjectBodyTagRcordDisposeCom(reqDTO));
    }
/**
   * D3执行循环处理指标责任主体标签记录(公共)
   */
    @PostMapping("implementDisposeObjtiveSubjectBodyTagRcordCom")
    public OkrResult<ImplementDisposeObjtiveSubjectBodyTagRcordComRespDto> implementDisposeObjtiveSubjectBodyTagRcordCom(@RequestBody @Validated ImplementDisposeObjtiveSubjectBodyTagRcordComReqDto reqDTO){
    return OkrResult.success(contTagRcordService.implementDisposeObjtiveSubjectBodyTagRcordCom(reqDTO));
    }
}
  